package com.niit.service;

import com.niit.entity.Application;
import com.niit.entity.Job;
import com.niit.entity.User;

import java.util.List;

public interface ApplicationService {
    //core:CURD

    //添加申请
    void addApplication(Application application);

    //删除申请
    void deleteApplication(int id);

    //修改申请（修改申请状态）
    void updateApplication(Application application);


    //查询申请列表
    List<Application> getApplications();

    //查询申请详情
    Application getApplicationById(int id);

    //查找个人的申请记录
    List<Application> getSeekerApplications(User seeker);

    //查找职位的申请记录
    List<Application> getJobApplications(Job job);


    //查找公司的申请记录
    List<Application> getCompanyApplications(User user);

    //统计职位的申请数量
    Long getCountByJob(Job job);

    boolean existsByJobIdAndSeekerId(Integer jobId, Integer seekerId);
}
